import request from "@/utils/request";
import { AxiosPromise } from "axios";
import { ListInfo, ListQuery } from "./types";

/**
 * 获取用户分页列表
 *
 * @param queryParams
 */
export function getListPage(
  queryParams: ListQuery
): AxiosPromise<PageResult<ListInfo[]>> {
  return request({
    url: "/admin/common/setting/pageList",
    method: "post",
    params: queryParams,
  });
}

// 新增设置
export function getListAdd(data: any) {
  return request({
    url: "/admin/common/setting/add",
    method: "post",
    data
  });
}


// 新增设置
export function getListEdit(data: any) {
  return request({
    url: "/admin/common/setting/update",
    method: "post",
    data
  });
}


// 删除设置
export function getListDel(data: any) {
  return request({
    url: "/admin/common/setting/del",
    method: "post",
    data
  });
}


// 刷新缓存
export function getRefreshAll(data: any) {
  return request({
    url: "/admin/common/setting/refreshAll",
    method: "post",
    data
  });
}

